<div class="modal-header bg-black">
    <h5 class="modal-title">在线充值</h5>
</div>
<div class="modal-body">
    <fieldset class="m-t-lg m-b-lg">
        <div class="clearfix m-b">
            <label class="col-lg-3 col-xs-5 control-label m-t-xs text-left">充值金额：</label>
            <div class="col-lg-9 col-xs-7 font-bold">
                <input type="text" class="form-control" ng-model="info.amount" placeholder="输入要充值的金额">
            </div>
        </div>
        <div class="clearfix m-b">
            <label class="col-lg-3 col-xs-5 control-label m-t-xs text-left">使用优惠码：</label>
            <div class="col-lg-9 col-xs-7">
                <div class="input-group m-b">
                    <input type="text" class="form-control" ng-model="info.couponCode" ng-change="checkCoupon()" ng-paste="checkCoupon()" placeholder="输入优惠码，立享折扣">
                    <div class="err m-t-sm" ng-bind-html="checkCouponMsg"></div>
                </div>
            </div>
        </div>
        <div class="clearfix m-b">
            <label class="col-lg-3 col-xs-5 control-label m-t-xs text-left">支付方式：</label>
            <div class="col-lg-9 col-xs-7">
                <div>
                    <label class="block m-b-sm padder-v">
                        <input type="radio" name="pay_type" ng-value="1" ng-model="info.type" checked="checked">直冲
                    </label>
                    <label class="block m-b-sm padder-v">
                        <input type="radio" name="pay_type" ng-value="2" ng-model="info.type">支付宝
                    </label>
                    <label class="block m-b-sm padder-v">
                        <input type="radio" name="pay_type" ng-value="3" ng-model="info.type">微信
                    </label>
                </div>
            </div>
        </div>
        <hr>
        <div class="clearfix m-b">
            <label class="col-lg-3 col-xs-5 control-label m-t-xs text-left">支付金额：</label>
            <div class="col-lg-9 col-xs-7">
                <div class="calc b-b">
                    <div class="clearfix m-b-xs"><span class="pull-left">优惠码：</span><span class="pull-right"><b>-</b>{{coupon.deduct | number:2}} 元</span></div>
                    <div class="clearfix m-b-xs"><span class="pull-left">充值金额：</span><span class="pull-right"><b>+</b>{{info.amount | number:2}} 元</span></div>
                </div>
                <div class="clearfix m-t-xs"><span class="pull-left">需要支付：</span><span class="pull-right text-info">{{info.amount - coupon.deduct | number:2}} 元</span></div>
            </div>
        </div>
    </fieldset>
</div>
<div class="modal-footer bg-black">
    <button class="btn btn-default m-r-lg" ng-click="cancel()">取消</button>
    <div ng-switch="payment_step" class="pull-right">
        <button ng-switch-when="0" class="btn btn-primary"  ng-click="createPayment()">生成订单</button>
        <a ng-switch-when="1"  ng-href="{{payment_url}}" target="_blank" class="btn btn-success" ng-click="waitPay()">立即支付</a>
        <a ng-switch-when="2"  href="javascript:void(0);" class="btn btn-info">等待支付中</a>
        <a ng-switch-when="3"  ng-click="ok()" class="btn btn-success">支付成功</a>
        <a ng-switch-when="4"  ng-click="ok()" class="btn btn-success">付款失败</a>
        <a ng-switch-when="5"  ng-click="ok()" class="btn btn-success">查询超时，请确认是否支付成功</a>
    </div>
</div>